<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page language="java" import="java.util.*,com.yigerende.pojo.*"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>紫云科技网络有限公司</title>
<link rel="stylesheet" type="text/css"
	href="<%=path%>/jsp/admin/css/common.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/jsp/admin/css/main.css" />
<script src="<%=path%>/jsp/admin/js/jquery-1.3.1.js"
	type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function() {

		$("#btOK").click(function() {

			var title = $("#title");
			var url = $("#url");
			var file = $("#pic").val();
			var content = $("#content");
			var temp1 = $("#temp1");

			if (title.val() == '') {
				alert("标题输入框为空");
				return false;
			} else if (url.val() == '') {
				alert("链接地址输入框为空");
				return false;
			}
			if (content.val() == '') {
				alert("简介输入框为空");
				return false;
			} else if (temp1.val() == '') {
				alert("显示时间输入框为空");
				return false;
			}
			return true;
		});
	});
</script>
</head>
<body style="background:url(<%=path%>/image/856.jpg);background-repeat: no-repeat;background-position: center center;background-size: cover;">
	<jsp:include page="top.jsp" />
	<div class="container clearfix">
		<jsp:include page="left.jsp" />
		<div class="main-wrap">

			<div class="crumb-wrap">
				<div class="crumb-list">
					<i class="icon-font"></i><a href="<%=path%>/jsp/admin/index.jsp">首页</a><span
						class="crumb-step">&gt;</span><span> <%
	Cooperative coo = (Cooperative) request.getAttribute("coo");
 	Integer type = Integer.parseInt(String.valueOf(request.getAttribute("type")));
 	if (type == 1) {
 %> 修改幻灯片 <%
 	} else if (type == 2) {
 %> 修改首页总部新闻<%
 	} else if (type == 3) {
 %> 修改合作伙伴 <%
 	} else if (type == 15) {
 %> 修改首页院校新闻 <%
 	}
 %>
					</span>
				</div>
			</div>
			<div class="result-wrap">
				<div class="result-content">
					<form
						action="<%=path%>/admin/AdminNewsServlet?flag=updateNews&type=<%=type%>&id=<%=coo.getId()%>"
						method="post" >
						<table class="insert-tab" width="100%">
							<tbody>

								<tr>
									<th>标题：</th>
									<td><input class="common-text" id="title" name="title"
										size="50" type="text" value="<%=coo.getTitle()%>"></td>
								</tr>
								<tr>
									<th>链接地址：</th>
									<td><input class="common-text" id="url" name="url"
										size="100" type="text" value="<%=coo.getLianjie()%>"></td>
								</tr>
								<tr>
									<th>图片名称：<input type="hidden" name="hid"
										value="<%=coo.getPic()%>"></th>
									<td><input type="file" id="pic" name="pic"></td>
								</tr>
								<tr>
									<th>简介：</th>
									<td><textarea name="content" class="common-textarea"
											id="content" cols="30" style="width: 98%;" rows="10"><%=coo.getJianjie()%></textarea></td>
								</tr>
								<tr>
									<th>显示时间：</th>
									<td><input class="common-text" id="temp1" name="temp1"
										size="50" type="text" value="<%=coo.getShijian()%>"></td>
								</tr>
								
								<tr>
									<th></th>
									<td><input class="btn btn-primary btn6 mr10" value="提交"
										type="submit" id="btOK"><input type="button"
										value="返回" onClick="history.go(-1)" class="btn btn6"></td>
								</tr>
							</tbody>
						</table>
					</form>
				</div>
			</div>

		</div>
		<!--/main-->
	</div>
</body>
</html>